//
//  UIView+Extension.m
//  cc
//
//  Created by ZLQ on 2016/10/24.
//  Copyright © 2016年 hbyj. All rights reserved.
//

#import "UIView+Extension.h"

@implementation UIView (Extension)
- (CGFloat)cc_height
{
    return self.frame.size.height;
}

- (void)setCc_height:(CGFloat)cc_height
{
    CGRect temp = self.frame;
    temp.size.height = cc_height;
    self.frame = temp;
}

- (CGFloat)cc_width
{
    return self.frame.size.width;
}

- (void)setCc_width:(CGFloat)cc_width
{
    CGRect temp = self.frame;
    temp.size.width = cc_width;
    self.frame = temp;
}


- (CGFloat)cc_y
{
    return self.frame.origin.y;
}

- (void)setCc_y:(CGFloat)cc_y
{
    CGRect temp = self.frame;
    temp.origin.y = cc_y;
    self.frame = temp;
}

- (CGFloat)cc_x
{
    return self.frame.origin.x;
}

- (void)setCc_x:(CGFloat)cc_x
{
    CGRect temp = self.frame;
    temp.origin.x = cc_x;
    self.frame = temp;
}

- (void)setCc_centerX:(CGFloat)cc_centerX{
    CGPoint point = self.center;
    point.x = cc_centerX;
    self.center = point;
}

- (CGFloat)cc_centerX{
    return self.center.x;
}

- (void)setCc_centerY:(CGFloat)cc_centerY{
    CGPoint point = self.center;
    point.y = cc_centerY;
    self.center = point;
}

- (CGFloat)cc_centerY{
    return self.center.y;
}

- (void)setCc_size:(CGSize)cc_size{
    CGRect frame = self.frame;
    frame.size = cc_size;
    self.frame = frame;
}


- (CGSize)cc_size{
    return self.frame.size;
}

@end
